<html>
<head><meta charset="utf-8"><title>Issue 8415 · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Issue.208415.html">Issue 8415</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="242650619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Issue%208415/near/242650619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Muscraft <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Issue.208415.html#242650619">(Jun 14 2021 at 19:52)</a>:</h4>
<p>I was wondering if <a href="https://github.com/Muscraft/cargo/tree/workspace">my branch of cargo</a> solves the issues put forward by <a href="https://github.com/rust-lang/cargo/pull/8664#issuecomment-704878103">this comment</a>. I have moved the full parsing of a manifest to later when we know what the root is but have not implemented MaybeWorkspace yet because I wanted to make sure my changes were meeting what was desired. If I need to explain my decisions, please let me know. <span class="user-mention" data-user-id="116015">@Alex Crichton</span></p>



<a name="242665539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Issue%208415/near/242665539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Issue.208415.html#242665539">(Jun 14 2021 at 22:12)</a>:</h4>
<p>Sorry I'm not sure what the diff is from master given that link, the latest commit on the branch looks like it's mostly adding things but I'd naively at least expect a lot of existing code paths to change as well. I may be missing some changes? In any case I'm happy to help review through PRs</p>



<a name="242668142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Issue%208415/near/242668142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Muscraft <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Issue.208415.html#242668142">(Jun 14 2021 at 22:45)</a>:</h4>
<p>I didn't change a ton of things since moving the parsing until after a root config has been found only required making a type that holds a TomlManifest and a WorkspaceConfig be returned until you found a root and then parse it to a manifest. Once you've found a root config you cause parse the original Cargo.toml and then look at members like you normally would. If this isn't what was wonted can you maybe describe what you are looking for a bit more?</p>



<a name="242755167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Issue%208415/near/242755167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Issue.208415.html#242755167">(Jun 15 2021 at 15:53)</a>:</h4>
<p>Oh I don't know if it's not what I wanted, it's just that I expected more changes. That original comment still summarizes what I'm thinking, which is that there's some intermediate form which is elaborated to the final form with a <code>WorkspaceConfig</code>. That should be an explicit step somewhere and the parsing code isn't intertwined with searching for workspaces and such on the filesystem</p>



<a name="242767783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Issue%208415/near/242767783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Muscraft <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Issue.208415.html#242767783">(Jun 15 2021 at 17:19)</a>:</h4>
<p>So currently, read manifest returns an IntermediateManifest which has the pkg id, TomlManifest, and the workspace config. When looking for the config it just checks if the works space config is a root. Once it finds a root it parses it into a manifest and a package using load (which eventually will take a root config). Once you find the root it parses the original manifest. then moves on to finding members which when one is found it is parsed into a package and put in the correct location. Load calls for the Intermediate and then uses to_real_manifest to make a real manifest for a package. So the step is there it's just hasn't changed much. This way searching for the Toml is done in read_manifest and the parsing is done by to_real_manifest. If you want it delayed further or want more fields to be elaborated I can do that.</p>



<a name="242800771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Issue%208415/near/242800771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Issue.208415.html#242800771">(Jun 15 2021 at 21:14)</a>:</h4>
<p>I think that sounds roughly about right? The next step is probably to make a PR? Sorry I'm not great about reviewing work-in-progress things like this</p>



<a name="242807611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Issue%208415/near/242807611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Muscraft <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Issue.208415.html#242807611">(Jun 15 2021 at 22:27)</a>:</h4>
<p>That's fine. Do you want me to make a new PR and reference the old one? Also, would you like me to wait until I've integrated MaybeWorkspace as well as stuff for dependencies?</p>



<a name="242808742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Issue%208415/near/242808742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Issue.208415.html#242808742">(Jun 15 2021 at 22:41)</a>:</h4>
<p>I think a new PR is fine, and yeah ideally tests would be mostly passing before posting a PR (unless you need help on tests passing)</p>



<a name="242810543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/Issue%208415/near/242810543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Muscraft <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/Issue.208415.html#242810543">(Jun 15 2021 at 23:03)</a>:</h4>
<p>All tests are passing currently, I just haven't done Maybe workspace stuff yet. I'll look into that then make a PR it might be a few days though</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>